package org.bedracket.pgeg.rune;

import net.minecraft.Util;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.registries.ForgeRegistries;
import org.bedracket.pgeg.api.RuneLike;

public class Rune extends Item implements RuneLike {

    private final String runeTag;
    public Rune(String runeTag) {
        super(new Properties().stacksTo(1));
        this.runeTag = runeTag;
    }

    @Override
    public ItemStack getDefaultInstance() {
        ItemStack stack = new ItemStack(asItem());
        RuneLike.setRuneTag(stack, runeTag);
        return stack;
    }

    @Override
    public String getDescriptionId() {
        return Util.makeDescriptionId("rune",
                ForgeRegistries.ITEMS.getKey(this));
    }
}
